import { ref } from 'vue'

type MENU_ITEM = {
  name: string
  title: string
  icon: string
}

type LINK_ITEM = {
  name: string
  href: string
  des: string
  logo: string
}

const menu: MENU_ITEM[] = [
  {
    name: 'metamask',
    title: 'Metamask',
    icon: 'metamask',
  },
  {
    name: 'ethers',
    title: 'Ethers.js',
    icon: 'ethers',
  },
  {
    name: 'contract',
    title: 'Contract',
    icon: 'contract',
  },
  {
    name: 'wallet',
    title: 'Wallet',
    icon: 'wallet',
  },
  {
    name: 'nft',
    title: 'NFT',
    icon: 'nft',
  },
  {
    name: 'erc20',
    title: 'ERC20',
    icon: 'erc20',
  },
]

const link: LINK_ITEM[] = [
  {
    name: 'Metamask',
    href: 'https://docs.metamask.io/guide/create-dapp.html#project-setup',
    logo: new URL('@/assets/website-logo/metamask.jpg', import.meta.url).href,
    des: '',
  },
  {
    name: 'Ethers',
    href: 'https://docs.ethers.io/v5/getting-started/',
    logo: new URL('@/assets/website-logo/ethers.jpg', import.meta.url).href,
    des: '',
  },
  {
    name: 'Ethereum',
    href: 'https://ethereum.org/zh/developers/learning-tools/',
    logo: new URL('@/assets/website-logo/Ethereum.png', import.meta.url).href,
    des: '',
  },
  {
    name: 'Openzeppelin',
    href: 'https://docs.openzeppelin.com/',
    logo: new URL('@/assets/website-logo/openzeppelin.png', import.meta.url).href,
    des: '',
  },
  {
    name: 'WalletConnect',
    href: 'https://docs.walletconnect.org/quick-start',
    logo: new URL('@/assets/website-logo/walletconnect.jpg', import.meta.url).href,
    des: '',
  },
  {
    name: 'Remix',
    href: 'https://remix.ethereum.org/',
    logo: new URL('@/assets/website-logo/remix.jpg', import.meta.url).href,
    des: '',
  },
  {
    name: 'TheGraph',
    href: 'https://thegraph.com/en/',
    logo: new URL('@/assets/website-logo/thegraph.jpg', import.meta.url).href,
    des: '',
  },
  {
    name: 'NFTStorage',
    href: 'https://nft.storage/',
    logo: new URL('@/assets/website-logo/nftstorage.png', import.meta.url).href,
    des: '',
  },
  {
    name: 'GoerliFaucet',
    href: 'https://goerlifaucet.com/',
    logo: new URL('@/assets/website-logo/alchemy.svg', import.meta.url).href,
    des: '',
  },
  {
    name: 'chainLink',
    href: 'https://faucets.chain.link/goerli',
    logo: new URL('@/assets/website-logo/chainlink.svg', import.meta.url).href,
    des: '',
  },
  {
    name: 'Alchemy',
    href: 'https://www.alchemy.com/',
    logo: new URL('@/assets/website-logo/alchemy.svg', import.meta.url).href,
    des: '',
  },
  {
    name: 'ChainList',
    href: 'https://chainlist.org/zh',
    logo: new URL('@/assets/website-logo/chainList.svg', import.meta.url).href,
    des: '',
  },
  {
    name: 'LearnBlockChain',
    href: 'https://learnblockchain.cn/',
    logo: new URL('@/assets/website-logo/learnblock.png', import.meta.url).href,
    des: '',
  },
  {
    name: 'ForeSightNews',
    href: 'https://foresightnews.pro/tools',
    logo: new URL('@/assets/website-logo/foresight.png', import.meta.url).href,
    des: '',
  },
  {
    name: 'PANews',
    href: 'https://www.panewslab.com/zh/index.html',
    logo: new URL('@/assets/website-logo/panews.png', import.meta.url).href,
    des: '',
  },
]

export default function () {
  const menuList = ref(menu)
  const linkList = ref(link)

  return {
    menuList,
    linkList,
  }
}
